/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.smart.hawk.controller.impl;

import co.com.smart.hawk.controller.HawkSitiosCtrl;
import co.com.smart.hawk.dto.SitiosDTO;
import co.com.smart.hawk.model.caller.MaestrosCaller;
import co.com.smart.hawk.model.caller.SitiosCaller;
import co.com.smart.hawk.utilities.Utility.CallBackSmartHawk;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Cesar Beltran
 */
public class HawkSitiosCtrlImpl implements HawkSitiosCtrl {

    private EntityManager entityManager;
    private SitiosCaller callerSitios;
    
    public HawkSitiosCtrlImpl() {
        this(null);
    }

    public HawkSitiosCtrlImpl(EntityManager entityManager) {
        this.entityManager = entityManager;
        callerSitios = new SitiosCaller();
    }

   
    @Override
    public void grabarSitios(CallBackSmartHawk<SitiosDTO> callBack, SitiosDTO sendObject) throws Throwable {
        callBack.endProcess(callerSitios.grabarSitios(sendObject));
    }

    @Override
    public void consultarSitios(CallBackSmartHawk<List<SitiosDTO>> callBack) throws Throwable  {
         callBack.endProcess(callerSitios.consultarSitios(null));
    }
    
    
}
